package org.hook.showcase.pattern.command.impl;

import org.hook.showcase.pattern.command.Command;

public class GarageDoorOpenCommand implements Command {
	private GarageDoor garageDoor;

	public GarageDoorOpenCommand(GarageDoor garageDoor) {
		this.garageDoor = garageDoor;
	}

	@Override
	public void execute() {
		this.garageDoor.open();
	}

	@Override
	public void undo() {
		this.garageDoor.close();
	}
}
